package com.idlecode.bean;

import cn.hutool.core.util.StrUtil;
import org.jetbrains.annotations.NotNull;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

/**
 * @program: IdleCode
 * @description
 * @author: rongjuwei
 * @create: 2024-08-27 13:50
 **/
public class CodeFormatEntity implements Serializable {
    private String dsId;

    private Map<String, String> info = new HashMap<>();

    public CodeFormatEntity() {
    }

    public CodeFormatEntity(String dsId) {
        this.dsId = dsId;
    }

    public String getDsId() {
        return dsId;
    }

    public void setDsId(String dsId) {
        this.dsId = dsId;
    }

    public Map<String, String> getInfo() {
        return info;
    }

    public void setInfo(Map<String, String> info) {
        this.info = info;
    }

    public void infoPut(@NotNull Object key, Object value) {
        info.put(key.toString(), StrUtil.utf8Str(value));
    }

    public String infoGet(@NotNull Object key) {
        return info.get(key);
    }

    @Override
    public String toString() {
        return "CodeFormatEntity{" +
                "dsId='" + dsId + '\'' +
                ", info=" + info +
                '}';
    }
}
